package com.pj;


import com.fly.jdbc.cfg.FlyConfig;
import com.fly.jdbc.cfg.FlyObjects;
import com.pj.gen.GenUtil;
import com.pj.gen.cfg.GenCfgManager;

public class SpGenerateApplication {

    public static void main(String[] args) {

        FlyConfig config = new FlyConfig();
        config.setDriverClassName("com.mysql.cj.jdbc.Driver");
        config.setUrl("jdbc:mysql://127.0.0.1:3306/sp-dev?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC");
        config.setUsername("root");
        config.setPassword("root");
        // 是否打印sql
        config.setPrintSql(true);
        // 注入到框架中
        FlyObjects.setConfig(config);

        GenCfgManager.cfg
                .setProjectPath("E:/test/sa-plus")
                .setServerProjectName("sp-server")
                .setPackagePath("com.pj.project")
                .addTableName("user");

        GenUtil.doRead();
        GenUtil.doOutMybatisPlus();
        GenUtil.doOutAdminHtml();


        System.out.println("\n\n------------------------------ 完结撒花 ------------------------------");
    }
}